package com.ruoyi.production.service.impl;

import com.ruoyi.production.domain.WorkReport;
import com.ruoyi.production.mapper.WorkReportMapper;
import com.ruoyi.production.service.IWorkReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 报工记录Service业务层处理
 *
 * @author ruoyi
 * @date 2022-09-05
 */
@Service
public class WorkReportServiceImpl implements IWorkReportService {
    @Autowired
    private WorkReportMapper workReportMapper;

    /**
     * 查询报工记录
     *
     * @param id 报工记录主键
     * @return 报工记录
     */
    @Override
    public WorkReport selectWorkReportById(Long id) {
        return workReportMapper.selectWorkReportById(id);
    }

    /**
     * 查询报工记录列表
     *
     * @param workReport 报工记录
     * @return 报工记录
     */
    @Override
    public List<WorkReport> selectWorkReportList(WorkReport workReport) {
        return workReportMapper.selectWorkReportList(workReport);
    }

    /**
     * 新增报工记录
     *
     * @param workReport 报工记录
     * @return 结果
     */
    @Override
    public int insertWorkReport(WorkReport workReport) {
        return workReportMapper.insertWorkReport(workReport);
    }

    /**
     * 修改报工记录
     *
     * @param workReport 报工记录
     * @return 结果
     */
    @Override
    public int updateWorkReport(WorkReport workReport) {
        return workReportMapper.updateWorkReport(workReport);
    }

    /**
     * 批量删除报工记录
     *
     * @param ids 需要删除的报工记录主键
     * @return 结果
     */
    @Override
    public int deleteWorkReportByIds(Long[] ids) {
        return workReportMapper.deleteWorkReportByIds(ids);
    }

    /**
     * 删除报工记录信息
     *
     * @param id 报工记录主键
     * @return 结果
     */
    @Override
    public int deleteWorkReportById(Long id) {
        return workReportMapper.deleteWorkReportById(id);
    }
}
